package com.spring.sunflower.common

import com.spring.sunflower.base.BaseObserver
import com.spring.sunflower.base.BasePresenter
import com.spring.sunflower.bean.WithdrawRecordBean

/**
 * Created by Kevin on 2021/8/31<br/>
 *
 * Describe:<br/>
 */
class WithdrawRecordPresenter(baseView: CommonContract.WithDrawRecordView) :
    BasePresenter<CommonContract.WithDrawRecordView>(baseView) {
    fun getWithdrawRecord(pageIndex: String) {
        val observable = requestDataSource.getWithdrawRecord(pageIndex)
        addDisposable(observable, object : BaseObserver<WithdrawRecordBean>(baseView) {
            override fun onSuccess(bean: WithdrawRecordBean) {
                baseView.showWithdrawRecord(bean.datas!!)
            }

            override fun onError(status: Int, msg: String?) {
            }
        })
    }
}